<%--
  Created by IntelliJ IDEA.
  User: 28101
  Date: 2021/9/23
  Time: 8:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link href="/css/bootstrap-theme.css" rel="stylesheet">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <script src="../js/jquery-3.3.1.min.js"></script>
    <title>insertCommodity</title>
    <style>
        .myDiv{
            margin-top: 50px;
        }

        .myDivCol{
            margin-top: 10px;
        }

        .mySub{
            background-color: #007bff;
            margin-left: 20px;
            width: 100px;
        }

        form{
            font-size: 20px;
        }

        .insertbtn{
            margin-bottom: 20px;
            background-color: #f6cc06;
            height: 30px;
            width: 180px;
            font-size: 20px;
            margin-left: 20px;
        }

        .dzdiv{
            overflow:hidden;
            outline: #bec0c2 solid 1px;
        }

    </style>
</head>
<body>

    <div class="container myDiv table-bordered">
        <form action="/CommodityServlet?method=insertCommodity" method="post">
            <div class="form-group col-md-6 myDivCol">
                商品类型：
                <select name="type" class="form-control">
                    <option value="1">手机</option>
                    <option value="2">家电</option>
                    <option value="3">智能</option>
                </select>
            </div>
            <div class="form-group col-md-6 myDivCol">
                商品名称: <input class="form-control" placeholder="商品名称" type="text" name="commodityName" >
            </div>
            <div class="form-group col-md-12 myDivCol">
                说明:<textarea class="form-control" placeholder="说明" type="text" name="describetest" ></textarea>
            </div>

            <div class="form-group col-md-6 myDivCol">
                版本名称: <input class="form-control" placeholder="版本名称" type="text" name="versionname" />
            </div>
            <div class="form-group col-md-6 myDivCol">
                原价: <input class="form-control" placeholder="原价" type="text" name="oprice" />
            </div>
            <div class="form-group col-md-6 myDivCol">
                现价: <input class="form-control" placeholder="现价" type="text" name="cprice" />
            </div>
            <div class="form-group col-md-6 myDivCol">
                数量: <input class="form-control" placeholder="数量" type="text" name="num" />
            </div>

            <div class="form-group col-md-6">
                颜色: <input class="form-control" placeholder="颜色" type="text" name="colorname" >
            </div>

            <div class="form-group col-md-12 myDivCol">
                <input class="mySub" type="submit" value="提交">
                <input id="btnToSelect" class="mySub" type="button" value="返回">
            </div>
        </form>
    </div>

    <script src="/js/bootstrap.min.js"></script>
    <script>

        $(".mySub").click(function () {
            if (confirm("确定要返回吗？")){
                window.location.href = "/CommodityManagerServlet?method=getCommodityByPage&type=1";
            }
        });

    </script>

</body>
</html>
